package cn.edu.nju.software.zp13.assignment5.service;

import cn.edu.nju.software.zp13.client.assignment3.seeder.CourseScoreGenerator;
import cn.edu.nju.software.zp13.client.assignment4.sax.xmlNodeEntity.CourseScoreList;

public class CourseScoreManager {
	public CourseScoreList getCourseScore(String studentId) {
		CourseScoreList csl = new CourseScoreList();
		csl.setCs(CourseScoreGenerator.run(5, studentId));
		return csl;
	}
	
	public CourseScoreList update(CourseScoreList csl){
		//a fake update process
		if(!"131250050".equals(csl.getCs()[0].getScore().getStudentId())){
			return null;
		}
		return csl;
	}
}
